<?php
// +-------------------------------------------------------------------------------
// | DingZone [ A Rapid Development Framework For Dingtalk ]
// +-------------------------------------------------------------------------------
// | 二维码图片 v1.0
// |
// | Copyright (c) 2014-2018 http://www.heimalanshi.com All rights reserved.
// | Author : Jie
// | Date : 2018-08-09
// +-------------------------------------------------------------------------------

namespace addons\index\controller;

use app\core\controller\CoreBaseController;
use think\Loader;

class QrcodeController extends CoreBaseController {
    /**
     * 生成二维码图片
     */
    public function index() {
        $size = input("get.size", 3);
        $content = input("get.content");

        Loader::import("qrcode.phpqrcode", EXTEND_PATH);
        \QRcode::png($content, false, QR_ECLEVEL_L, $size);
    }
}